import { Http } from "../utils/http";
class Houses extends Http {
  constructor(props) {
    super(props);
  }
  //房详情
  list(pageNum = 1, pageSize = 10) {
    let obj = {
      pageNum,
      pageSize,
    };
    return this.request({
      url: "/mini/center/my/address",
      data: obj,
    });
  }
  //房详情
  detail(obj) {
    return this.request({
      url: "/mini/center/my/house/detail",
      data: obj,
    });
  }
  //住户列表
  userlist(pageNum = 1, pageSize = 10, houseId) {
    let obj = {
      pageNum,
      pageSize,
      houseId,
    };
    return this.request({
      url: "/mini/center/my/household",
      data: obj,
    });
  }
  add(obj) {
    return this.request({
      url: "/mini/center/saveOrUpdate/my/address",
      data: obj,
      method: "POST",
    });
  }
  detele(houseMemberId) {
    return this.request({
      url: "/mini/center/delete/house/hold?houseMemberId=" + houseMemberId,
      method: "DELETE",
    });
  }
  userDetail(obj) {
    return this.request({
      url: "/mini/center/my/house/hold/detail",
      data: obj,
    });
  }
  homeowner(obj) {
    return this.request({
      url: "/mini/userInfo/houseHold",
      data: obj,
    });
  }
}
export { Houses };
